#ifndef INPUT_EVENT_HANDLER_H
#define INPUT_EVENT_HANDLER_H
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "event_groups.h"

#define INPUT_TASK_SIZE 128
#define INPUT_TASK_NAME "input event task"
#define INPUT_TASK_PRI 2
extern TaskHandle_t input_task_handle;
extern QueueHandle_t input_event_queue;
extern EventGroupHandle_t input_event_group;

#define KEY_EVENT_ID 0x01
#define CAN_EVENT_ID 0x02

#define KEY_EVENT_UP_BIT	(0x01<<0)
#define KEY_EVENT_0_BIT	    (0x01<<1)
#define KEY_EVENT_1_BIT	    (0x01<<2)

#define KEY_EVENT_UP (KEY_EVENT_ID<<8 | 0x01)
#define KEY_EVENT_0  (KEY_EVENT_ID<<8 | 0x02)
#define KEY_EVENT_1  (KEY_EVENT_ID<<8 | 0x03)



BaseType_t input_event_init(void);
void send_input_event(uint16_t event);
#endif
